package com.xy.shop.common.constant;

import java.util.HashMap;
import java.util.Map;

public class Rst {
    public static Map<String, Object> getReturnData(Object data, boolean resultFlag, Integer code, String msg){
        Map<String, Object> parameters=new HashMap<String, Object>();
        parameters.put(CommonContants.SUCCESS,resultFlag);
        //列表展示数据
        parameters.put("data", data);
        if (code !=null ) {
            parameters.put(CommonContants.CODE, code);
            parameters.put(CommonContants.MESSAGE, msg);
        }
        return parameters;

    }
}
